#!/bin/bash
result=""

for num in {100..999}; do
    h=$((num / 100))
    t=$(((num % 100) / 10))
    u=$((num % 10))
    sum=$((h**3 + t**3 + u**3))
    if [ $sum -eq $num ]; then
        if [ -z "$result" ]; then
            result="$num"
        else
            result="$result,$num"
        fi
    fi
done

echo "$result"
